FROM golang:alpine AS build-env
WORKDIR /app
ADD . .
ENV GOPROXY=https://goproxy.io
RUN go build -o app main.go


FROM alpine:latest AS production
WORKDIR /app
EXPOSE 80
COPY --from=build-env /app .
ENTRYPOINT [ "./app" ]